#include "CClient_ZoidCom.h"

CZoidClient::CZoidClient(IClientCallbacks* parent)
{
    m_pParent = parent;
}

CZoidClient::~CZoidClient()
{

}

void CZoidClient::ZCom_cbConnectResult( ZCom_ConnID _id, eZCom_ConnectResult _result,
                                   ZCom_BitStream &_reply )
{
  if (_result == eZCom_ConnAccepted)
  {
      // store final connection

      // create lobby radio

      //GUI message
      m_pParent->emitChatMessages("Connected");
  }
}

void CZoidClient::ZCom_cbConnectionClosed( ZCom_ConnID _id, eZCom_CloseReason _reason, ZCom_BitStream &_reasondata )
{
    // remove connection

    // destroy lobby radio

    // GUI message
    m_pParent->emitChatMessages("Disconnected");
}

void CZoidClient::ZCom_cbNodeRequest_Dynamic( ZCom_ConnID _id, ZCom_ClassID _requested_class, ZCom_BitStream *_announcedata,
                              eZCom_NodeRole _role, ZCom_NodeID _net_id )
{
    // pass the request on to the parent class, since it has
    // to create the objects

}
